package com.stylefeng.guns.common.persistence.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * lg_段位
 * </p>
 *
 * @author stylefeng123
 * @since 2018-01-31
 */
@TableName("lg_division")
public class Division extends Model<Division> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 名称
     */
    @Length(min = 1, max = 100, message = "段位名称字数必须在1到100之间")
    @NotBlank(message="段位名称不能为空")
    private String name;
    /**
     * 段位所需星星数量
     */
    @Range(min = 0, max = 2147483647, message = "星星数量必须在0到2147483647之间")
    @NotNull(message="星星数量不能为空")
    private Integer star;
    /**
     * 每场胜利经验值
     */
    @Range(min = 0, max = 2147483647, message = "获胜经验值必须在0到2147483647之间")
    @NotNull(message="获胜经验值不能为空")
    private Integer exp;
    /**
     * 入场所需旗帜数
     */
    @Range(min = 0, max = 2147483647, message = "入场所需旗帜必须在0到2147483647之间")
    @NotNull(message="入场所需旗帜不能为空")
    private Integer flag; /**
     * 入场所需旗帜数
     */
    @Range(min = 0, max = 2147483647, message = "胜利所得旗帜必须在0到2147483647之间")
    @NotNull(message="胜利所得旗帜不能为空")
    private Integer winflag;
    /**
     * 段位顺序
     */
    @Range(min = 0, max = 2147483647, message = "段位顺序必须在0到2147483647之间")
    @NotNull(message="段位顺序不能为空")
    private Integer sort;
    /**
     * 备注
     */
    @Length(max = 1000, message = "备注字数不得大于1000")
    private String remarks;

    private String img;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStar() {
        return star;
    }

    public void setStar(Integer star) {
        this.star = star;
    }

    public Integer getExp() {
        return exp;
    }

    public void setExp(Integer exp) {
        this.exp = exp;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public Integer getWinflag() {
        return winflag;
    }

    public void setWinflag(Integer winflag) {
        this.winflag = winflag;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Division{" +
        "id=" + id +
        ", name=" + name +
        ", star=" + star +
        ", exp=" + exp +
        ", flag=" + flag +
        ", sort=" + sort +
        ", remarks=" + remarks +
        "}";
    }
}
